package com.simen.connectandroid;

/**
 * Created on 2021/11/1 13:54.
 *
 * @author Simen
 */
public enum Operation {

    CONNECT, DISCONNECT, PULLAPK,PULLTOPAPK, PUSH;

    public static Operation parse(String operation) {
        if ("-disconnect".equalsIgnoreCase(operation)) {
            return DISCONNECT;
        } else if ("-apk".equalsIgnoreCase(operation)) {
            return PULLAPK;
        } else if ("-topapk".equalsIgnoreCase(operation)) {
            return PULLTOPAPK;
        } else if ("-push".equalsIgnoreCase(operation)) {
            return PUSH;
        }
        return CONNECT;
    }
}
